const router = require('koa-router')()
const shopApiCon = require('../controller/shopApiController')
const tokenCheck = require('../middlewares/auth')


router.prefix('/apis/shops')

router.all('*',tokenCheck.tokenCheck)

router.get('/types',shopApiCon.getAllTypes)

router.post('/shops',shopApiCon.getSearchShopManage)

router.post('/addshop',shopApiCon.addShop)

router.delete('/deleteshop/:id',shopApiCon.deleteShop)

router.put('/updateshop',shopApiCon.updateShop)

router.post('/downloadShopPic/:id',shopApiCon.downloadShopPic)

module.exports = router